import { axios } from "../../../utils/request";

const api = {
    getByCompany: "/crm/callMinutes/getByCompany",          //当月分钟数使用情况
    changeRenewalType: "/crm/callMinutes/changeRenewalType",//变更套餐续费方式
    pageRecord: "/crm/callMinutesRecord/pageList",          //分钟数使用记录
    isCallEnable:"/crm/callMinutes/isCallEnable",           //是否可以外呼

    
};


/**
 * 分页查询
 */
export function pageRecord(data) {
    return axios({
      url: api.pageRecord,
      method: "post",
      data: data
    });
}
/**
 * 当月分钟数使用情况
 * @param {*} parameter 
 * @returns 
 */
export function getByCompany(parameter) {
    return axios({
      url: api.getByCompany,
      method: "get",
      params: parameter
    });
  }
/**
 * 变更自动续费的套餐
 * @param {*} data 
 * @returns 
 */
export function changeRenewalType(data) {
    return axios({
      url: api.changeRenewalType,
      method: "post",
      params: data
    });
}
/**
* 是否可以外呼
* @param {*} parameter 
* @returns 
*/
export function isCallEnable(parameter) {
   return axios({
     url: api.isCallEnable,
     method: "get",
     params: parameter
   });
 }
